package com.xy.biz.xd.domain.converter;

import java.util.Collection;
import java.util.List;

import com.xy.biz.xd.domain.bo.DocumentFlowBO;
import com.xy.biz.xd.domain.bo.DocumentFlowBorrowAndPrintAndDropBO;
import com.xy.biz.xd.domain.bo.DocumentFlowBorrowBO;
import com.xy.biz.xd.domain.po.DocumentFlowBorrowPO;
import com.xy.biz.xd.domain.resp.DocumentFlowTodoResponse;
import com.xy.tool.util.BeanUtilsEx;
//import com.xy.biz.xd.domain.resp.GetDocumentFlowBorrowResponse;
//import com.xy.biz.xd.domain.req.SaveDocumentFlowBorrowRequest;
//import com.xy.biz.xd.domain.req.ListDocumentFlowBorrowRequest;

/**
 *
 *
 * @author wwj
 * @date 2021-2-4
 */
public class DocumentFlowBorrowConverter {

	public static DocumentFlowBorrowPO toPO(DocumentFlowBorrowBO source) {
		return BeanUtilsEx.copyProperties(source, () -> new DocumentFlowBorrowPO(), true);
	}

	public static DocumentFlowBorrowPO toPO(DocumentFlowBorrowAndPrintAndDropBO source) {
		return BeanUtilsEx.copyProperties(source, () -> new DocumentFlowBorrowPO(), true);
	}

	public static List<DocumentFlowBorrowPO> toPO(Collection<DocumentFlowBorrowBO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new DocumentFlowBorrowPO(), true);
	}

	public static DocumentFlowTodoResponse toTaskResponse(DocumentFlowBO source) {
		return BeanUtilsEx.copyProperties(source, () -> new DocumentFlowTodoResponse(), true);
	}


	public static DocumentFlowBorrowBO fromPO(DocumentFlowBorrowPO source) {
		return BeanUtilsEx.copyProperties(source, () -> new DocumentFlowBorrowBO());
	}

	public static List<DocumentFlowBorrowBO> fromPO(Collection<DocumentFlowBorrowPO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new DocumentFlowBorrowBO());
	}

//	public static DocumentFlowBorrowBO toBO(SaveDocumentFlowBorrowRequest source) {
//		return BeanUtilsEx.copyProperties(source, () -> new DocumentFlowBorrowBO(), true);
//	}
//
//	public static List<DocumentFlowBorrowBO> toBO(Collection<SaveDocumentFlowBorrowRequest> source) {
//		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new DocumentFlowBorrowBO(), true);
//	}
//
//	public static GetDocumentFlowBorrowResponse toResponse(DocumentFlowBorrowBO source) {
//		return BeanUtilsEx.copyProperties(source, () -> new GetDocumentFlowBorrowResponse());
//	}
//
//	public static List<GetDocumentFlowBorrowResponse> toResponse(Collection<DocumentFlowBorrowBO> source) {
//		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new GetDocumentFlowBorrowResponse());
//	}
//
//	public static DocumentFlowBorrowQuery toQuery(ListDocumentFlowBorrowRequest source) {
//		if(null == source) {
//			return null;
//		}
//		DocumentFlowBorrowQuery target = new DocumentFlowBorrowQuery(source.getPageIndex(), source.getPageSize());
//		BeanUtilsEx.copyProperties(source, target);
//		return target;
//	}

}
